<?php
/**
 * Created by PhpStorm.
 * User: 13095
 * Date: 2018/9/14
 * Time: 10:57
 */

namespace app\api\validate;


use think\Validate;

class ValidateRole extends Validate
{
    protected $rule = [
        ['role_name','require|max:30','role_name no empty%|role_name format error%'],
        ['role_on','require','role_name no empty%'],
    ];
    protected $scene = [
        ['add'=>['role_name','role_on']],
        ['edit'=>['role_name','role_on']],
    ];
}